package com.commonlyUsedClass.StringStudy;

/***
 * @ClassName: Test
 * @Description:
 * @Auther: 送一一块二向箔
 * @Date: 10:28 2022/2/15
 * @version : V1.0
 */
public class Test {
    public static void main(String[] args) {
        String str = "this is , a  text";

        String[] split = str.split("[ ,]+");
        for (String s : split) {
            System.out.println(s);
        }

        String replace = str.replace("text", "java");
        System.out.println(replace);

        StringBuffer stringBuffer = new StringBuffer("hello world");
        stringBuffer.replace(1,2,"dfs");
        System.out.println(stringBuffer);


    }
}
